if (GTK_WIDGET_VISIBLE (child->widget))
{
if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
- gtk_widget_get_width_for_height (child->widget,
- allocation->height,
- &sizes[i].minimum_size,
- &sizes[i].natural_size);
+ gtk_extended_layout_get_width_for_height (GTK_EXTENDED_LAYOUT (child->widget),
+ allocation->height,
+ &sizes[i].minimum_size,
+ &sizes[i].natural_size);
else
- gtk_widget_get_height_for_width (child->widget,
- allocation->width,
- &sizes[i].minimum_size,
- &sizes[i].natural_size);
+ gtk_extended_layout_get_width_for_height (GTK_EXTENDED_LAYOUT (child->widget),
+ allocation->width,
+ &sizes[i].minimum_size,
+ &sizes[i].natural_size);
size -= sizes[i].minimum_size;
*natural_size = requisition;
}
-/**
- * gtk_widget_get_desired_size:
- * @widget: a #GtkWidget
- * @minimum_size: location for storing the @widget's minimum size, or %NULL
- * @natural_size: location for storing the @widget's preferred size, or %NULL
- *
- * Retreives a widget's desired size, considering restrictions imposed by
- * #GtkSizeGroup<!-- -->s. See also: gtk_extended_layout_get_desired_size().
- *
- * Since: 2.20
- */
-void
-gtk_widget_get_desired_size (GtkWidget *widget,
- GtkRequisition *minimum_size,
- GtkRequisition *natural_size)
-{
- g_return_if_fail (GTK_IS_WIDGET (widget));
- _gtk_size_group_compute_desired_size (widget, minimum_size, natural_size);
-}
-
-void
-gtk_widget_get_height_for_width (GtkWidget *widget,
- gint width,
- gint *minimum_height,
- gint *natural_height)
+static void
+gtk_widget_real_get_height_for_width (GtkExtendedLayout *layout,
+ gint width,
+ gint *minimum_height,
+ gint *natural_height)
{
GtkRequisition minimum_size;
GtkRequisition natural_size;
- g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_if_fail (GTK_IS_WIDGET (layout));
#if 0
TODO: integrate height-for-width with size-groups
#else
- gtk_widget_get_desired_size (widget,
+ gtk_widget_get_desired_size (GTK_WIDGET(layout),
minimum_height ? &minimum_size : NULL,
natural_height ? &natural_size : NULL);
#endif
}
-void
-gtk_widget_get_width_for_height (GtkWidget *widget,
- gint height,
- gint *minimum_width,
- gint *natural_width)
+static void
+gtk_widget_real_get_width_for_height (GtkExtendedLayout *layout,
+ gint height,
+ gint *minimum_width,
+ gint *natural_width)
{
GtkRequisition minimum_size;
GtkRequisition natural_size;
- g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_if_fail (GTK_IS_WIDGET (layout));
#if 0
TODO: integrate width-for-height with size-groups
#else
- gtk_widget_get_desired_size (widget,
+ gtk_widget_get_desired_size (GTK_WIDGET(layout),
minimum_width ? &minimum_size : NULL,
natural_width ? &natural_size : NULL);
#endif
}
+/**
+ * gtk_widget_get_desired_size:
+ * @widget: a #GtkWidget
+ * @minimum_size: location for storing the @widget's minimum size, or %NULL
+ * @natural_size: location for storing the @widget's preferred size, or %NULL
+ *
+ * Retreives a widget's desired size, considering restrictions imposed by
+ * #GtkSizeGroup<!-- -->s. See also: gtk_extended_layout_get_desired_size().
+ *
+ * Since: 2.20
+ */
+void
+gtk_widget_get_desired_size (GtkWidget *widget,
+ GtkRequisition *minimum_size,
+ GtkRequisition *natural_size)
+{
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+ _gtk_size_group_compute_desired_size (widget, minimum_size, natural_size);
+}
+
static void
gtk_widget_layout_interface_init (GtkExtendedLayoutIface *iface)
{
iface->get_desired_size = gtk_widget_real_get_desired_size;
+ iface->get_width_for_height = gtk_widget_real_get_width_for_height;
+ iface->get_height_for_width = gtk_widget_real_get_height_for_width;
}